package com.example.flinkcourse.lesson1.transform;

import org.apache.flink.api.common.functions.MapFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 自定义 Map 转换函数
 * 用于字段映射与类型转换
 */
public class MyMapFunction implements MapFunction<String, String> {
    private static final Logger LOG = LoggerFactory.getLogger(MyMapFunction.class);

    @Override
    public String map(String value) throws Exception {
        LOG.debug("Processing record: {}", value);
        
        // 示例：将输入字符串转换为大写
        String result = value.toUpperCase();
        
        LOG.debug("Transformed record: {}", result);
        return result;
    }
} 